<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
 <style type="text/css">
				.form-groups {
				    width: 80%;
				     margin-right: 15px; 
				    margin-left: 15px; 
				    margin-bottom: 15px;  
				}
				.col-lg-9s {
				    width: 65%;
				}
				.left{
					width:30%;
					float:left;
				}
				.center{
					width:30%;
				}
				.bootstrap-dialog.type-primary .modal-header {
				  
				    text-align: center;
				}
				.bootstrap-dialog  .bootstrap-dialog-title {
				    font-weight: 900;
				    font-size: 20px;
				}
				.modal-header {
				    min-height: 16.43px;
				    padding: 15px;
				    border-bottom: 1px ;
				}
				.modal-content{
					width: 100%;
				}
				table{
			        table-layout:fixed;word-wrap:break-word;
			    }
			    table td {
				     white-space: normal; 
				    overflow: hidden;
				    text-overflow: ellipsis;
				}
				.blew{
					 font-weight: 900;
				}
				.rows{
					margin-left: 15px;
					margin-right: 15px;
				}
</style>

<form class="form-horizontal">
	<div class="row">
		<div class="form-groups ">
		    <label class="col-lg  left">会员手机号：${user.phone }</label>
		    <label class="col-lg  center">姓名：${user.name }</label>
		    <label class="col-lg  right">所属分公司：${user.storeName }</label>
		</div>
		<div class="form-groups">
			<label class="col-lg  left">积分：${user.sppoint }</label>
		    <label class="col-lg  center">抵扣券：${user.jkpoint }</label>
		    <label class="col-lg  right">惠券：${user.jypoint }</label>
		</div>
	</div>
	<c:if test="${fn:length(offJfOrderList) >0}">
		 <div class="rows">
		 	<div class="text-muted single-line-text pull-left blew" >线下积分消费订单明细</div>
		 </div>	
		 <div class="rows">
	 		<div class=" panel-default" >
				<table  class="table table-hover table-bordered" >
		            <thead>
		               	<tr>
							<th>积分类型</th>
							<th>积分变化项目</th>
							<th>积分发生分公司</th>
							<th>积分变化</th>
							<th>变化时间</th>
						</tr>
						<c:forEach items="${offJfOrderList }" var="off">
							<tr>
								<td>
									<c:if test="${off.pointtype==1 }">积分</c:if>
									<c:if test="${off.pointtype==2 }">抵扣券</c:if>
									<c:if test="${off.pointtype==3 }">惠券</c:if>
								</td>
								<td>${off.goodsName }</td>
								<td>${off.storeName }</td>
								<td>-<fmt:formatNumber type="number" pattern="###">${off.point }</fmt:formatNumber></td>
								<td>${off.createDate }</td>
							</tr>
						
						</c:forEach>
		            </thead>
		        </table>
			</div>
		</div>
  </c:if>
  <c:if test="${fn:length(offOrderList) >0}">
		 <div class="rows">
		 	<div class="text-muted single-line-text pull-left blew" >线下会员订单明细</div>
		 </div>	
		 <div class="rows">
	 		<div class=" panel-default" >
				<table  class="table table-hover table-bordered" >
		            <thead>
		               	<tr>
							<th>订单编号</th>
							<th>项目名称</th>
							<th>下单分公司</th>
							<th>余额</th>
							<th>积分</th>
							<th>抵扣券</th>
							<th>惠券</th>
							<th>变化时间</th>
						</tr>
						<c:forEach items="${offOrderList }" var="off">
							<tr>
								<td>${off.Number }</td>
								<td>${off.orderDetail }</td>
								<td>${off.Selldianpu }</td>
								<td><fmt:formatNumber type="number" pattern="###">${off.Total*orderMoney }</fmt:formatNumber></td>
								<td><fmt:formatNumber type="number" pattern="###">${off.Total*sppoint }</fmt:formatNumber></td>
								<td><fmt:formatNumber type="number" pattern="###">${off.Total*jkpoint }</fmt:formatNumber></td>
								<td><fmt:formatNumber type="number" pattern="###">${off.Total*jypoint }</fmt:formatNumber></td>
								<td>${off.Date }</td>
							</tr>
						
						</c:forEach>
		            </thead>
		        </table>
			</div>
		</div>
  </c:if>
  	<c:if test="${fn:length(orderList) >0}">
		 <div class="rows">
		 	<div class="text-muted single-line-text pull-left blew">线上会员订单明细</div>
		 </div>	
		 <div class="rows">
	 		<div class=" panel-default" >
				<table class="table table-hover table-bordered" >
		            <thead>
		               	<tr>
							<th>订单编号</th>
							<th>项目名称</th>
							<th>下单分公司</th>
							<th>余额</th>
							<th>积分</th>
							<th>抵扣券</th>
							<th>惠券</th>
							<th>变化时间</th>
							<th>备注</th>
						</tr>
						<c:forEach items="${orderList }" var="orr">
							<tr>
								<td>${orr.fromOrderNum }</td>
								<td>${orr.goodsName }</td>
								<td>${orr.title }</td>
								<c:if test="${orr.type==1 }">
									<td>
										<c:if test="${orr.orderMoney!=0 && orr.orderMoney>0 && orr.flag !=14}">-</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.orderMoney }</fmt:formatNumber>
									</td>
									<td>
										<c:if test="${orr.sppoint!=0 && orr.sppoint>0}">+</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.sppoint }</fmt:formatNumber>
									</td>
									<td>
										<c:if test="${orr.dedu!=0 && orr.dedu>0}">+</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.dedu }</fmt:formatNumber>
									</td>
									<td>
										<c:if test="${orr.coupon!=0 && orr.coupon>0}">+</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.coupon }</fmt:formatNumber>
									</td>
								</c:if>
								<c:if test="${orr.type==2 }">
									<td>
										<c:if test="${orr.orderMoney!=0 && orr.orderMoney>0 && orr.flag !=14}">+</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.orderMoney }</fmt:formatNumber>
									</td>
									<td>
										<c:if test="${orr.sppoint!=0 && orr.sppoint>0}">-</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.sppoint }</fmt:formatNumber>
									</td>
									<td>
										<c:if test="${orr.dedu!=0 && orr.dedu>0}">-</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.dedu }</fmt:formatNumber>
									</td>
									<td>
										<c:if test="${orr.coupon!=0 && orr.coupon>0}">-</c:if><fmt:formatNumber minFractionDigits="2" minIntegerDigits="1" type="number" pattern="###">${orr.coupon }</fmt:formatNumber>
									</td>
								</c:if>
								<td>${orr.createDate }</td>
								<td>${orr.describe }</td>
							</tr>
						
						</c:forEach>
		            </thead>
		        </table>
			</div>
		</div>
  </c:if>
</form>
